package com.mall.seckill_mall.service;

import com.mall.seckill_mall.common.Result;
import com.mall.seckill_mall.entity.Goods;
import com.mall.seckill_mall.enums.CodeMessage;
import com.mall.seckill_mall.vo.GoodsList;

import java.util.List;

public interface GoodsService {
    String createGoods(Goods goods);
    void deleteGoods(String goodsId);
    void updateGoods(Goods goods);
    List<GoodsList> selectOnlyUp();
    List<GoodsList> selectSalersGoods(String salerId);
    Goods getGoods(String goodsId);
    void addGoodsList(String listKey, GoodsList goodsList);
    void addGoodsStock(String goodsId, int stock);
    int preReduceStock(String goodsId);
    int releaseStock(String goodsId);
    void reduceStock(String goodsId);
    void checkSeckillStatus(String goodsId);
    long getRemainSeconds(String goodsId);

    Result getSeckillStatus(String goodsId);
    String testApi();
}
